package com.zy.web.demo.duoxiancheng.demo37;

import java.util.Timer;
import java.util.concurrent.ScheduledExecutorService;

/**
 * @author <a href="mailto:zhouyong@cqyyt.com">zy</a>
 * @version 1.0
 * @date 2020/10/12 15:08
 * 双检查锁
 */
public class Service37 {

    private volatile static Service37 service37;

    private Service37(){}

    public static Service37 getInstance(){
        try {
            if ( service37 != null ){

            }else {
                synchronized (Service37.class){
                    if ( service37 == null ){
                        service37 = new Service37();
                    }
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        return service37;
    }

}
